from random import randint 


def dice():
	return [randint(1,6), randint(1,6)]
	
bal = 5000
c=0
for x in range(500):
	bal -= 10
	if bal  <= 0:
		print "broke"
		break
	if sum(dice()) == 12:
		bal += 10 + 10 * 30
		c+=1

print 'you have $%d, 12 came out %d times' % (bal,c)